Repository navigation
fix(app-shell): an app whose navigation holds only doc entries opens its first doc - #29769
Merged
Merged
Conversation
…its first doc The app root landed on object, page, dashboard, report and component entries only and rendered nothing when none was shown, so a doc-only app opened to an empty main. When no other entry lands, the root now opens the first doc entry the member is shown, in the in-app docs portal. The designer preview's landing mirror follows. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRL46SawdHef859orD
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRL46SawdHef859orD
Contributor
Author
|
domain:ui#3 · zhuangjianguo · session_01QsR2jV4dWohojjbTJTQq5m 席位核对 · ACCEPT · 2026-11-03T04:14ZHead-sha:
|
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Fixes #29678
Clause-②: no
Metadata-protocol: none
维护者速读
ui/packages/app-shell/src/console/AppContent.tsx的resolveLandingRoute(兜底顺序)与findFirstRoute(类型集合参数化);ui/packages/app-shell/src/views/metadata-admin/previews/AppPreview.tsx的findFirstLanding。pnpm --dir ui exec vitest run packages/app-shell/src/console/__tests__/AppContent.docOnlyLanding-29678.test.tsx,应见 7 个用例全绿:纯文档应用落到/apps/APP/docs/BOOK,各对照组照旧。What changes
Claim: issuecomment 6593568853 (round 30), amended by 6593605696 (AppPreview parity).
An app whose navigation holds only
docentries opened/apps/APPto an emptymain:findFirstRoutelands on object, page, dashboard, report and component entries only, andAppRootLandingrenderednullwhen none landed.AppContent.tsx:findFirstRoutetakes the set of entry types it lands on (default: the five it always took).resolveLandingRouteis now: the declared landing, else the first working entry, else the firstdocentry the member is shown (groups walked,urlpassed over). Adocentry's route is the one the sidebar follows,resolveHref's in-app docs portal (docs/BOOK[/DOC]under the app), which the console host mounts in itsextraRoutes.doclanding already is (Console: an app opens on the firstlandingentry whosevisiblepredicate holds #28450): by the server's audience gate on the app read (it drops an unreadabledocentry) and on the doc read. The sidebar's own doc-readability answer (useNavDocTargetCheck) is NOT available to the landing without a new wait: it is a lazydoc/booklist read that answersundefined(pass every entry) until it loads, so on the landing's first render it never has an answer. Measured live below: a doc behind a book the member may not read never reaches the landing, because the server already dropped its entry.resolveLandingRoute, so a pending bound entry ahead of the doc still holds the skeleton.AppPreview.tsx(amendment):findFirstLandingmirrors the runtime, so the designer preview names the first doc as the landing when nothing else lands.return nullbranch now covers only apps whose entries are allurl/actionlinks or live only underareas; its comment says so.Tests
ui/packages/app-shell/src/console/__tests__/AppContent.docOnlyLanding-29678.test.tsx(7, harness asAppContent.landingWaitsReads-13097.test.tsx, with the host's docs route stubbed): a doc-only app lands on its first doc; a doc inside a group behind aurllink; CONTROL first entry a doc then an object lands on the object; CONTROL object app redirects; CONTROL no navigation keepsAppNoAccessEmptyState; CONTROL a pending bound entry ahead of the doc holds the skeleton and lands on the bound entry when shown; the same pending entry failing lands on the doc.AppPreview.docEntry-11197.test.tsx: one new case, aurl+ twodocentries names the first doc as the landing. The existing "→ Accounts" pin is unchanged and green.Ablations (scripts/ablation-replace.mjs, mutation verified on disk, restored to HEAD with an empty git diff)
resolveLandingRoute: 3 failed / 4 passed (the two doc-only cases and the pending-then-fail case red; the four controls green).AppPreview: 1 failed / 3 passed (the new preview case red).Sweep
Every ui test file importing
AppContentorAppPreview(59 files,git grep -l), two locked batches at 2 workers, on the merged head e5ff194: 31/31 files 202 tests, 28/28 files 333 tests. The same 59 files were green on d8352d2 before the merge of main (30/30 201, 29/29 334).@object-ui/app-shelltype-check exit 0 on e5ff194.Acceptance notes
--freshbackend, Vite console on this branch's source, 1440x900): packagecom.qa.r29678with a published docr29678_guide, a doc-only appr29678_help(onedocentry), a control appr29678_ctrl(oneobjectentry), andr29678_locked_appwhose only entry opens a book gated to a permission set nobody holds. Signed in as admin, asauditor.demo(reader) and asphone.demo(outsider):origin/mainin the same running console):r29678_helpstays at/apps/com.qa.r29678with an emptymainfor all three;/apps/com.qa.r29678/docs/com.qa.r29678/r29678_guide(the portal's canonical in-book URL) and read the doc;r29678_ctrl:/apps/r29678_ctrl/showcase_taskin both legs, for all three;r29678_locked_app: the server drops the unreadable entry, so all three get "Nothing in R29678 Locked is available to you yet" in both legs; nobody is sent to a refused doc page.Screenshots and the JSON readings are in the project files under
issue-29678/shots/; the seat links them.url/actionlinks, or live only underareas, still opens to an emptymain(measured live on this head:r29678_urlonly, oneurlentry, emptymainfor admin, reader and outsider).ui/packages/app-shell/src/console/appServesNoNavigation.ts's docblock still listsdocamong the entries the landing resolver never lands on. It is outside this card's file surface, so it is left for the seat.Verification
Local,
dispatch-gates --commands --repo objectstack-ai/objectstackderived 35 families on this diff: all 35 run, every one exit 0,--ranreconciliation35 run, 0 NOT-MEASURED, 0 UNRUN(the uivitest run scripts/suite under the verify lock: 170 files / 4977 tests green). Re-run on the merged head e5ff194: all 35 again exit 0,--ran35 run, 0 NOT-MEASURED, 0 UNRUN(uivitest run scripts/170 files / 4977 tests). eslint on the four touched ui files: 0 errors.dispatch-gates --tier: no path-derived mandate. Changed lines 431 (under 3000). CI check-runs: see this PR.Generated by Claude Code